package request

type MenuRequest struct {
	ID        int64  `json:"id"`
	ParentID  int64  `json:"parent_id"`
	Name      string `json:"name" binding:"required"`
	Path      string `json:"path" binding:"required"`
	Component string `json:"component"`
	Icon      string `json:"icon" binding:"required"`
	OrderNum  int    `json:"order_num"`
	Hidden    int8   `json:"hidden"`
	KeepAlive int8   `json:"keep_alive"`
	Redirect  string `json:"redirect"`
}

// 新增管理员
type CreateAdminUserRequest struct {
	Username   string   `json:"username" binding:"required"`
	Password   string   `json:"password" binding:"required"`
	RoleID     int64    `json:"role_id" binding:"required"`
	Email      string   `json:"email" binding:"required"`
	Mobile     string   `json:"mobile" binding:"required"`
	Nickname   string   `json:"nickname" binding:"required"`
	Status     int8     `json:"status" binding:"required"`
	Avatar     string   `json:"avatar" binding:"required"`
	Role       string   `json:"role" binding:"required"`
	Permission []string `json:"permission" binding:"required"`
	Menu       []string `json:"menu" binding:"required"`
}

// 新增权限
type PermissionRequest struct {
	ID          int64  `json:"id"`
	Name        string `json:"name" binding:"required"`
	Code        string `json:"code" binding:"required"`
	Type        int8   `json:"type" binding:"required"` // 1=菜单权限 2=按钮权限
	Method      string `json:"method"`
	Path        string `json:"path"`
	Description string `json:"description"`
}

// 角色绑定菜单
type AssignMenuToRoleRequest struct {
	RoleID  int64   `json:"role_id" binding:"required"`
	MenuIds []int64 `json:"menu_ids" binding:"required"`
}
